package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

/**
 *  药物列表请求类 
 *
 * @author hongyuhao
 * @version 2014年5月27日 - 上午10:26:31
 */
public class UserDrugShowRequest extends Request {

	private static final long serialVersionUID = -3188136583694459375L;
	
	private int id;
	
	@Override
	public void parse(HttpServletRequest request) {
		
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		
		
		id = requestInfo.getIntParameter(ApiUrlParamEnum.id.getParamName(), -1);
		if(-1 == id) {
			throw new RequestIllegalException("缺少需要的值，id=" + id);
		}
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public int getId() {
		return id;
	}
	
}
